﻿<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="Eg.Core" namespace="Eg.Core">
    <class name="UserDetail" table="UserDetail">
        <id name="UserId">
            <!--<generator class ="foreign">
                <param name="UserId">Users</param>
            </generator>-->
            <generator class ="foreign">
                <param name="property">Users</param>
            </generator>

        </id>
        <property name="LastUpdate" type="DateTime"/>
        <component class="PersonName" name="Name">
            <property name="FirstName" column="[First Name]" type="string"/>
            <property name="LastName" column="[Last Name]" type="string"/>
        </component>
        <one-to-one name="Users" class="Users" cascade="all" lazy="proxy" constrained="true"/>
    </class>
</hibernate-mapping> 
